<!--
 * @Author: zhangxiangsheng 1026583651@qq.com
 * @Date: 2024-06-19 18:54:07
 * @LastEditors: zhangxiangsheng 1026583651@qq.com
 * @LastEditTime: 2024-06-25 09:12:25
 * @FilePath: \appGly\pages\Station\StationHD\StationHD.vue
 * @Description: 
 * 
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. 
-->
<template>
	<view class="">
		<u-navbar title="站点配置"></u-navbar>
		<view class="list">
			<view class="item" :class="{ noafter: key + 1 == list.length }" v-for="(item, key) in list" :key="key"
				@click="itemtap(item)">
				<view class="label">
					{{ item.label }}
				</view>
				<view class="label" v-if="item.value">
					{{ item.value }}
				</view>
				<view v-else class="icon">
					<u-icon name="arrow-right" size="20" color="#969696"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		props: {
			item: {
				type: Object,
				default: () => {
					return {};
				},
			},
		},
		data() {
			return {
				Station: {},
				query: {},
			};
		},
		onLoad(query) {
			this.query = query;
		},
		computed: {
			list() {
				let r = [{
						label: this.$z.$t("收费模式"),
						url: `/pages/Station/StationHD/StationedtHDtype?id=${this.query.pcs}`,
					},
					{
						label: this.$z.$t("全卡通设置"),
						url: `/pages/Station/StationHD/StationedtHDprintid?id=${this.query.pcs}`,
						inputs: [{
							prop: "printid",
							label: "全通卡卡号"
						}],
					},
					{
						label: this.$z.$t("客服电话"),
						url: `/pages/Station/StationHD/StationedtHDtelfu1?id=${this.query.pcs}`,
						inputs: [{
							prop: "telfu1",
							label: this.$z.$t("客服电话")
						}],
					},

					// {
					//   type: "Cdzfwf",
					//   label: "服务方基本信息",
					// },
					// {
					//   type: "cdzpic",
					//   label: "站点图片",
					// },
				].map((e) => {
					return {
						...e,
						label: this.$z.$t(e.label),
					};
				});
				return r;
			},
		},
		methods: {
			async init() {
				// let Station = await this.$z.request("/Station", {
				//   id: this.item.pcs,
				// });
				// this.Station = Station[0];
				// console.log(Station, "Station");
			},
			itemtap(item) {
				if (item.url) {
					this.$z.gopage(item.url);
				}
			},
		},
	};
</script>
<style lang="scss" scoped>
	.Stationaddbtn {
		margin: 20rpx;
		background: #fff;
		height: 88rpx;
		border-radius: 8rpx;
		display: flex;
		align-items: center;
		justify-content: center;

		.iconfont {
			margin-right: 8rpx;
		}
	}

	.scroll-Y {
		height: 100%;
	}

	.list {
		.item {
			height: 104rpx;
			display: flex;
			background-color: #fff;
			align-items: center;
			position: relative;

			.label {
				width: 260rpx;
				padding-left: 30rpx;
			}

			.icon {
				position: absolute;
				right: 30rpx;
			}

			&::after {
				content: "";
				height: 2rpx;
				position: absolute;
				left: 30rpx;
				bottom: 0;
				right: 0;
				background-color: #cfcfcf;
				transform: scaleY(0.5);
			}

			&.noafter {
				&::after {
					display: none;
				}
			}
		}
	}
</style>